package com.stlm2.dems.entity;

/**
 * Author：fuchunyu
 * Date：2017/12/20
 * Description：积分商品类型
 */
public enum GoodsType {
    IntegralConversion(1) {
        public String toString() {
            return "积分兑换";
        }
    },
    IntegralPrize(2) {
        public String toString() {
            return "积分抽奖";
        }
    };
    private final int val;

    GoodsType(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static GoodsType getByIntValue(int n) {
        switch (n) {
            case 1:
                return IntegralConversion;
            case 2:
                return IntegralPrize;
            default:
                return null;
        }
    }
}
